Split Txn
Concrete class that represents the destination side of a transaction. The destination side of the transaction is associated with exactly one source (or parent) transactions. The amount of a SplitTxn is stored in terms of the currency of the account for the associated ParentTxn.
Properties
Returns the address book entry (if any) that is associated with this transaction.
Get the check number as an integer (returns 0 if it's not an integer)
Returns the check number as a long (returns 0 if it's not an integer value)
The check number associated with this transaction.
The status (unreconciled, reconciling, cleared) associated with this transaction.
Returns the value of the Txn in terms of a non-security currency. For example, if this is for the security split of an investment transaction, then it will return the value of the buy/sell/short/cover in terms of the investment account's currency instead of the number of shares.
Get the date that this transaction was entered.
The description associated with this transaction
The amount of the transaction in a different currency than that of this transaction's account. This might be the original currency from a reminder, the downloaded form of this transaction, or possibly an amount entered using a UI that performed automatic currency conversion.
If a syncable item is part of a grouped object, where multiple MoneydanceSyncableItems are part of the same syncable object, then this returns the parent object. An example is for SplitTxn which is not synced itself, but its associated ParentTxn is, so the SplitTxn class should override this method to return getParentTxn(). The default implementation here returns 'this'.
Whether the financial institution reported this transaction as pending (authorised, but not yet posted) when it was last downloaded. The amount and the date of a pending transaction can still change, and the institution can cancel it altogether, in which case a later download will remove it. This mirrors the pending flag of originalOnlineTxn, but is stored separately so that it can be read cheaply, eg. while drawing the register.
Get the list of tags or keywords associated with the other side of this transaction
Returns the account to which the other side of this transaction is assigned
Return the number of "other transactions".
Return a data class with the currency and value of the other side of this Txn
The IDs that the financial institution used to identify this transaction by before a correction replaced each of them with the current one, newest first, or null if the FI has never replaced the ID of this transaction.
Return whether this item should be shown in the sidebar, which prefers a local file setting, followed by an object parameter, falling back to using defaultSidebarVisibility which returns true if the item would be expected to appear in the sidebar by default, such as in the case of bank, credit card, or investment accounts, or memorised reports and graphs.
Get a character that indicates the status of this transaction
Subclasses should override this to return a static string identifying their type of object
Get the date of this transaction for tax purposes.
Get the type of transaction. Usually only used in the investment register to differentiate between buy, sell, and stock split transactions.
Return a data class with the currency and value of this Txn
Functions
Add/merge all parameters from the given map that don't already have a key in the internal map
Set the TagSet associated with this object. This should only be called when initially constructing this object from old data files. In other words, DON'T USE THIS!
transactions are explicitly updated when recording a transaction
Deletes this item by removing it from the parent. The parent will then need to be saved (syncItem()) in order to commit the change.
Lookup and return an account that was referenced by this object using one of the given parameter names. Priority is given to acctIDKey which should reference the UUID of the account being referenced. If the acctIDKey lookup is not successfull then a lookup is done using the acctNumKey which references the integer account ID that is returned by getAccountNum() on the referenced account. If either acctNumKey or acctIDKey is null then that key is not checked for an account reference.
Lookup and return an address book entry that was referenced by this object using one of the given parameter names. Priority is given to addressIDKey which should reference the UUID of the address being referenced. If the addressIDKey lookup is not successfull then a lookup is done using the addressNumKey which references the integer address ID that is returned by getID() on the referenced account. If either addressNumKey or addressIDKey is null then that key is not checked for an account reference.
Return the storage location, if any, that is associated with the given tag name. The resulting file can be retrieved by calling one of the file reading methods on the account book's local storage interface:
Get the specified parameter as a boolean. If the given parameter does not have a value, or if it is not a boolean, return null
Get the specified parameter as a boolean. If the given parameter does not have a value, or if it is not a boolean, return the given default value
Lookup and return the currency referenced by this object using the given parameter key
Lookup and return a currency that was referenced by this object using one of the given parameter names. Priority is given to currIDKey which should reference the UUID of the currency being referenced. If the currIDKey lookup is not successfull then a lookup is done using the currNumKey which references the integer account ID that is returned by getID() method on the referenced currency. If either currNumKey or currIDKey is null then that key is not checked for a currency reference.
Lookup and return a currency that was referenced by this object using one of the given parameter names. Priority is given to currIDKey which should reference the UUID of the currency being referenced. If the currIDKey lookup is not successfull then a lookup is done using the currNumKey which references the integer account ID that is returned by getID() method on the referenced currency. If no currency has been found then the parameter value associated with the currencyIDString key is checked for a currency ID string (usually the three character ISO currency ID). Any of the parameters currNumKey, currIDKey, or currencyIDString can be null in which case that parameter is not checked for a currency reference.
Get the specified parameter as a double (64 bit) float. If the given parameter does not have a value, or if it is not an double, return the given defaul value
Return the ID that the financial institution uses to identify this transaction. Specific to the protocolId which is defined in OnlineTxn.
Returns the list of strings that was stored with setInlineStringListParameter, or null if the parameter has no value.
Get the specified parameter as an integer. If the given parameter does not have a value, or if it is not an integer, return the given defaul value
Get the specified parameter as a long. If the given parameter does not have a value, or if it is not a long, return null
Get the specified parameter as a long. If the given parameter does not have a value, or if it is not a long, return the given default value. This method was created as of build 254.
If this is an editing copy of an item, return the original
Return the "other transaction" for this split.
Get the value associated with the given key (if any) in this transaction's set of tags.
Get the specified parameter name. If the given parameter does not have a value, return the given defaultStr
Get the amount of this transaction in terms of the currency of the parent transaction.
Returns the String value associated with the given key in the local data file-specific preferences
Returns the boolean value associated with the given key in the local data file-specific preferences. If it's not found in the local datastore then check this object's syncable parameters for the same key
Returns the boolean value associated with the given key in the local data file-specific preferences
Returns the double value associated with the given key in the local data file-specific preferences
Returns the integer value associated with the given key in the local data file-specific preferences
Returns an array of integers from in the local data file-specific preferences that were stored using setPreference(String, int[])
Returns the long value associated with the given key in the local data file-specific preferences
Return a list of string values that were stored with setPreference(key, ...) (ie in the local data file-specific preferences)
Returns a list of SyncRecord objects which were stored with setPreference(key, ...) in the local data file-specific preferences.
Returns a new SyncRecord with the key-value pairs for which the keys have the given prefix in the local data file-specific preferences.
Return a list of string values that were stored with setPreference(key, ...) (ie in the local data file-specific preferences)
Returns a list of SyncRecord objects which were stored with setParameter(key, sublist)
Returns a SyncRecord map which was stored with setParameter(key, Map)
Return true if if this transaction has any attachments
Returns true if this object has already been recorded as part of this data set. This can often be used to tell whether we're creating a new object or editing an existing one, for example in a transaction or account editor form.
Check whether this transaction includes a transfer to the given account.
This is called after an item is updated by calling itemWasUpdated(SyncRecord). This can occur from the syncing process or from being loaded locally. Override this method to be notified.
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called. Override this method to be notified or if you'd like to store anything into the info record to be synced.
Set the TagSet associated with this object. This should only be called when initially constructing this object by the system. In other words, DON'T USE THIS!
Returns true if this transaction has been marked as to-be-printed.
Reverses the sign of the amount of the split
Remove the specified attachment tag, along with the file that it contains
Remove the parameter with the given name.
Mark this transaction as unmodified. This should be called only after being saved.
Store a reference to acct in this object using the given keys. The acctNumKey, if non-null, refers to the number returned by acct.getAccountNum(). The acctIDKey, if non-null, refers to the string returned by acct.getUUID() and will generally be more reliable and have a faster lookup time. If not storing references to accounts that have been migrated from before Moneydance 2015 then please only use the acctIDKey to store references.
Store a reference to address in this account using the keys. The acctNumKey, if non-null, refers to the number returned by address.getAccountNum(). The acctIDKey, if non-null, refers to the string returned by address.getUUID() and will generally be more reliable and have a faster lookup time. If not storing references to accounts that have been migrated from before Moneydance 2015 then please only use the acctIDKey to store references.
Set the amounts for this transaction, including the amount of the transaction in the split account, and the amount of the transaction in the account of the parent transaction.
Set the amounts for this transaction, including the amount of the transaction in the split account, the rate, and the amount of the transaction in the account of the parent transaction. newParentAmount must equal -Math.round(newSplitAmount * rate). The rate is ignored unless newParentAmount or newSplitAmount are zero (thus invalidating the above equation.
Set the file that is associated with the given tag name, copying the file into the data set's internal storage.
Store a reference to the given currency in this object using the given parameter key.
Store a reference to currency in this object using the given keys. The currNumKey, if non-null, refers to the number returned by curr.getID(). The currIDKey, if non-null, refers to the string returned by curr.getUUID() and will generally be more reliable and have a faster lookup time. If not storing references to accounts that have been migrated from before Moneydance 2015 then please only use the acctIDKey to store references.
Put the object into "editing mode" in which no changes will be automatically saved until you call syncItem() on this. Note that calling duplicate() will put the new duplicate into editing mode automatically
Set the ID that the financial institution uses to identify this transaction. The TID is specific to the protocol type which is defined in OnlineTxn.
Store the given list of strings in a single parameter, instead of the parameter-per-item that setParameter(name, List) stores. Read it back with getInlineStringListParameter.
Set the given parameter name to the given boolean value
Set the given parameter name to the given double value
Set the given parameter name to the given integer value
Set the given parameter name to the given long value
Set the given parameter name to the given value but don't notify listeners of changes!
Set the amount of the transaction in the parent account. The newRate value indicates the rate that should be used to calculate the amount of the transaction in the split account.
Set the given parameter name to the given boolean value, without sending an account-changed event, or recording the account as dirty.
Set the given parameter name to the given integer value, without sending an account-changed event, or recording the account as dirty.
Set the given preference name to the given value and associate it with this object in local storage. This will not be synced and neither will it result in any modification notifications being triggered.
Saves the given sublist into local storage, associated with this object. Values can be retrieved using getPreferenceSublist(prefix).
Take the amount and rates from the given split.
Return true iff this transaction has a FI transaction ID associated with it. This method is only avaialable as of build 551